package cn.uin.domain.family.model.valobj;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;

/**
 * @ClassName RegisterTypeEnum
 * @Description:家庭角色类型枚举
 * @Author: Administrator
 * @CreateDate: 2025/10/22 9:46
 * @Version: 1.0
 */
@Getter
@AllArgsConstructor
@NoArgsConstructor
public enum FamilyRoleTypeEnum {

	ADMIN(1, "admin"),
	MEMBER(2, "member");

	private Integer code;
	private String info;

	public static FamilyRoleTypeEnum get(Integer code) {
		switch (code) {
			case 1:
				return ADMIN;
			case 2:
				return MEMBER;
			default:
				throw new RuntimeException("err code!");
		}
	}

}
